package com.tjhzzx.ibmsSupervisor.enums;

import javax.baja.sys.BFrozenEnum;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;

/**
 * @author Luc
 * @date 2019-11-14 22:13
 */
public final class BSubSystemType extends BFrozenEnum {
    public static final int PAGE = 1;
    public static final int URL = 2;
    public static final int IMAGE = 3;
    public static final int TEXT = 4;
//    public static final int USER = 7;
//    public static final int DHDRIVER = 8;
//    public static final int GAURD = 9;
//    public static final int VIDEO = 10;


    public static final BSubSystemType page = new BSubSystemType(1);
    public static final BSubSystemType url = new BSubSystemType(2);
    public static final BSubSystemType image = new BSubSystemType(3);
    public static final BSubSystemType text = new BSubSystemType(4);
//    public static final BSubSystemType user = new BSubSystemType(7);
//    public static final BSubSystemType dhDriver = new BSubSystemType(8);
//    public static final BSubSystemType guard = new BSubSystemType(9);
//    public static final BSubSystemType video = new BSubSystemType(10);

public static final BSubSystemType DEFAULT = page;

    public BSubSystemType(int ordinal) {
        super(ordinal);
    }

    public static BSubSystemType make(int ordinal) {
//        return (BSubSystemType) velocityPage.getRange().get(ordinal, false);
        return (BSubSystemType) page.getRange().get(ordinal, false);
    }

    public static BSubSystemType make(String tag) {
//        return (BSubSystemType) velocityPage.getRange().get(tag);
        return (BSubSystemType) page.getRange().get(tag);
    }


    @Override
    public Type getType() {
        return TYPE;
    }

    public static final Type TYPE = Sys.loadType(BSubSystemType.class);
}
